package com.domain.oa.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.domain.oa.entity.Role;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (Role)表数据库访问层
 *
 * @author makejava
 * @since 2023-02-20 15:50:45
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 添加权限
     * @param roleId
     * @param menuId
     * @return
     */
    Integer addRoleByMenuId(@Param("roleId") Integer roleId,
                            @Param("menuId") Integer menuId);

    Integer removeRoleByMenuId(@Param("roleId") Integer roleId,
                               @Param("menuId") Integer menuId);

    List<Role> getAllRole();
}

